package com.yq.ylmall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yq.ylmall.dto.product.CategoryBrandNameQueryDto;
import com.yq.ylmall.model.product.CategoryBrand;
import com.yq.ylmall.vo.product.BrandVo;
import com.yq.ylmall.vo.product.CategoryBrandPageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 分类品牌 Mapper 接口
 * </p>
 *
 * @author yzk789
 * @since 2024-05-31
 */
public interface CategoryBrandMapper extends BaseMapper<CategoryBrand> {

    IPage<CategoryBrandPageVo> queryCategoryBrand(IPage<CategoryBrandPageVo> page, @Param("dto") CategoryBrandNameQueryDto dto);

    void updateByIds(@Param("dto") CategoryBrand dto);

    List<BrandVo> getBrandByCategoryId(@Param("id") Long categoryId);

    List<Long> getParentCategoryIds(@Param("id") Long categoryId);
}
